#ifndef OVERVIEW_H
#define OVERVIEW_H

#include <QMainWindow>
#include <QListWidget>
#include "creditutility.h"
namespace Ui {
class Overview;
}

class Overview : public QMainWindow
{
    Q_OBJECT

public:
    explicit Overview(QWidget *parent = nullptr);
    ~Overview();

    QMainWindow *home;
    QMap<QString, Student> students;
    QMap<QString, Activity> activities;

    void refreshStu();
    void refreshAct();
    void refreshActList();
    void refreshDat();
    void refreshOview(const unsigned spacing);
    void updateRecordView();
    QStringList ActivityTypeNames(ActivityType type);

    QString curActName={},curRecName={};
    ActivityType recCheckState = allType;
    void updateRecCheckState();
private slots:
    void on_overviewTabWid_currentChanged(int index);

    void on_homeBtn_clicked();

    void on_saveBtn_clicked();

    void on_queryStuEdit_textChanged(const QString &arg1);

    void on_addStuBtn_clicked();

    void on_remStuBtn_clicked();

    void on_importStuBtn_clicked();

    void on_newActBtn_clicked();

    void on_impActBtn_clicked();

    void on_remActBtn_clicked();

    void on_actListWid_itemDoubleClicked(QListWidgetItem *item);

    void on_actNameEdit_editingFinished();

    void on_actTypeStuWork_clicked(bool checked);

    void on_actTypePerDev_clicked(bool checked);

    void on_actTypeVolAct_clicked(bool checked);

    void on_actTypePracVis_clicked(bool checked);

    void on_actTypeComLife_clicked(bool checked);

    void on_actTypeAll_clicked(bool checked);

    void on_recNewBtn_clicked();

    void on_recRemBtn_clicked();

    void on_recListWid_itemDoubleClicked(QListWidgetItem *item);

    void on_recTableWid_cellClicked(int row, int column);

    void on_recTypeStuWork_clicked(bool checked);

    void on_recTypePerDev_clicked(bool checked);

    void on_recTypeVolAct_clicked(bool checked);

    void on_recTypePracVis_clicked(bool checked);

    void on_recTypeComLife_clicked(bool checked);

    void on_recTypeAll_clicked(bool checked);

    void on_returnBtn_clicked();

    void on_paBatchAddBtn_clicked();

    void on_paRemBtn_clicked();

    void on_paUpdBtn_clicked();

    void on_creditCSVBtn_clicked();

    void on_recNameEdit_editingFinished();

    void on_actNameQueryEdit_textChanged(const QString &arg1);

    void on_creditTableWid_itemSelectionChanged();

    void on_creditQueryEdit_textChanged(const QString &arg1);

    void on_exportActBtn_clicked();

    void on_stuListWid_itemDoubleClicked(QListWidgetItem *item);

private:
    Ui::Overview *ui;
};

#endif // OVERVIEW_H
